let service =
  Eliom_service.Http.service
    ~path:["carte"]
    ~get_params:(Eliom_parameter.int "num_carte")
    ()

let fichiers = Array.init 78 (Imgcartes.load)

let recharger_images () = 
  for i=0 to -1 + Array.length fichiers do
    fichiers.(i) <-Imgcartes.load i
  done

let register () =
  Eliom_registration.String.register
    ~service:service
    (fun num_carte () -> 
      Lwt.return
	(fichiers.(((num_carte mod 78) + 78) mod 78), 
	 "image/png"))
